<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script>
var oDate=new Date();

oDate.setDate(oDate.getDate()+14);

document.cookie='user=blue;expires='+oDate;

alert(document.cookie);
</script>
</head>

<body>
</body>
</html>
